﻿/*自己注册的员工需要审核 进入审核页面 
*2020.20.10.29 
*hanxl
*/
	function checkUpdateReviewInfo(){
		 var checkNum = $("input[name='ckone']:checked").length;
		    if(checkNum==0){
                   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
					var iUserID =  $("input[name='ckone']:checked").val();		 
					 location.href="/mmy/toupdatereview?iUserID="+ iUserID;
				}
				}
/*自己注册的员工 管理员审核并分配角色 
*2020.20.10.29 
*hanxl
*/
function updateReview(){
		  var checkNum = $("input[name='ckone']:checked").length;
    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{			
    if(confirm("确定要提交吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());	
        });
       var iUserID =$("#userID").val();
    }
    $.ajax({
        url:"/mmy/updatereview?iUserID="+iUserID,
        type:"post",
        data:{
            checkList:checklist.toString()
        },
        dataType:"text",
        success:function () {
			 location.reload();
            var txt=  "审核成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);	
        },
        error:function () {
           var txt=  "审核失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}
/*自己注册的员工 审核未通过 
*2020.20.10.29 
*hanxl
*/
function updateNotReview(){
   var checkNum = $("input[name='ckone']:checked").length;
		    if(checkNum==0){
                   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
					 if(confirm("确定要提交吗？")){
					var iUserID =  $("input[name='ckone']:checked").val();	 
					 location.href="/mmy/toupdatenotreview?iUserID="+ iUserID;
				}
				}
}
//后台招投标管理
//后台招标首页显示  分页问题 2020.11.19
function bidInvitePageSize(value){
	var strInviteName = $("#searchInviteName").val();
	var strType =  $("#searchType").val();
	location.href="/mmy/bidinviteindex?pageSize=" + value +"&strInviteName=" +strInviteName+"&strType=" +strType;	
	}
//后台近郊首页显示-切换分页请求 liys 2020.12.21
function SurroudingTourismPageSize(value){
	location.href="/mmy/surroudingtourismindex?pageSize=" + value;
	}
//后台预留单首页显示-切换分页请求 liys 2020.12.31
function OrderReservedPageSize(value){
	location.href="/mmy/orderreserved?pageSize=" + value;
	}
//后台订单首页显示-切换分页请求 liys 2020.12.31
function OrderPaidPageSize(value){
	location.href="/mmy/orderpaid?pageSize=" + value;
	}
//后台退单首页显示-切换分页请求 liys 2020.12.31
function OrderCancelPageSize(value){
	location.href="/mmy/ordercancel?pageSize=" + value;
	}





var num = 0;
var no=0;
var day=1;
//新建线路行程   投标行程也用到  2020.12.10
function addTable() {
 var tableHtml ="";
 tableHtml += 
'<tbody id="tbody'+num+'">'
+'<tr>'
+'<th rowspan="11" colspan="2"><label for="TripDay'+num+'">第</label><input type="number" class="daywidth" id="TripDay'+num+'" name="Day" size="2" maxlength="2"  value="'+Number(day)+'" required="required"/><label for="TripDay'+num+'">天</label><span class="mustWrite">*</span></th>'
+'<th ><label for="TripAddress'+num+'">地点</label></th>'
+'<td ><input type="text" id="TripAddress'+num+'" name="Address" maxlength="128" required="required"/><span class="mustWrite">*</span></td>'
+'<th ><label for="TripStay'+num+'">住宿</label></th>'
+'<td ><input type="text" id="TripStay'+num+'" name="Stay" maxlength="128" required="required"/><span class="mustWrite">*</span></td>'
+'<th ><label for="TripMeal'+num+'">含餐</label></th>'
+'<td ><input type="text" id="TripMeal'+num+'" name="Meal" maxlength="64" required="required"/><span class="mustWrite">*</span></td>'
+'<td rowspan="11"><input type="button"  class="btn" onclick="removeTr('+num+')" value="删除"></td> '
+'</tr>'
+'<tr>'
+'<th ><label for="TripTrip'+num+'">具体行程</label></th>'
+'<td colspan="5"><textarea id="TripTrip'+num+'" name="Trip" maxlength="512" required="required"></textarea><span class="mustWrite">*</span></td>'
+'</tr>'
+'<tr>'
+'<th rowspan="4"><label for="TripHotel1'+num+'">酒店照片</label></th>'
+'<td><label for="TripHotel1'+num+'">图片1:</label></td>'
+'<td colspan="4" ><input type="file" id="TripHotel1'+num+'" name="HotelPath1" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripHotel2'+num+'">图片2:</label></td>'
+'<td colspan="4" ><input type="file" id="TripHotel2'+num+'" name="HotelPath2" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripHotel3'+num+'">图片3:</label></td>'
+'<td colspan="4" ><input type="file" id="TripHotel3'+num+'" name="HotelPath3" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripHotel4'+num+'">图片4:</label></td>'
+'<td colspan="4" ><input type="file" id="TripHotel4'+num+'" name="HotelPath4" /></td>'
+'</tr>'
+'<tr>'
+'<th rowspan="4"><label for="TripScenic1'+num+'">景点照片</label></th>'
+'<td><label for="TripScenic1'+num+'">图片1:</label></td>'
+'<td colspan="4" ><input type="file" id="TripScenic1'+num+'" name="ScenicPath1" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripScenic2'+num+'">图片2:</label></td>'
+'<td colspan="4" ><input type="file" id="TripScenic2'+num+'" name="ScenicPath2" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripScenic3'+num+'">图片3:</label></td>'
+'<td colspan="4" ><input type="file" id="TripScenic3'+num+'" name="ScenicPath3" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripScenic4'+num+'">图片4:</label></td>'
+'<td colspan="4" ><input type="file" id="TripScenic4'+num+'" name="ScenicPath4" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripMemo'+num+'">备注:</label></td>'
+'<td colspan="5" ><textarea id="TripMemo'+num+'" name="Memo" maxlength="256"></textarea></td>'
+'</tr>'
+'</tbody>';
   
  var elements = $("#tripTable").children().length; //表示id为“mtTable”的标签下的子标签的个数
   
  $("#tripTable").children().eq(elements-1).after(tableHtml); //在表头之后添加空白行
  num++;  
day++;
 }


//删除行程行 2020.12.15 hanxl  
function removeTr(trNum){
 $("#tbody"+trNum).remove();
var i = 0;
	$("#tripTable tbody ").each(function () { //循环tab tbody下的tr
		$(this).find("input[name='Day']").val(i++);//更新行号
		
	});
	day=i;
	
}
/*新建签证材料整理 参照行程修改！！！！！！  记得添加字数限制maxlength="64" 以及必填required="required"和符号*/
function addStuffTable() {
 var tableHtml ="";
 tableHtml += 
'<tbody id="tbody'+num+'">'
+'<tr>'
+'<th rowspan="2"><label for="StuffNo'+num+'">序号</label></th>'
+'<td rowspan="2"><input type="number" id="StuffNo'+num+'" name="No" size="2"  value="'+Number(day)+'"/></td>'
+'<th ><label for="VisaStuffName'+num+'">材料名称</label></th>'
+'<td >'
+'<input type="text" id="VisaStuffName'+num+'" name="StuffName" /></td>'
+'<th ><label for="VisaStuffNumber'+num+'">所需数量</label></th>'
+'<td ><input type="number" id="VisaStuffNumber'+num+'" name="Number" /></td>'
+'<td rowspan="2"><input type="button"  class="btn" onclick="removeStuffTr('+num+')" value="删除"></td> '
+'</tr>'
+'<tr>'
+'<td><label for="VisaStuffMemo'+num+'">备注:</label></td>'
+'<td colspan="3" ><textarea id="VisaStuffMemo'+num+'" name="Memo"></textarea></td>'
+'</tr>'
+'</tbody>';
   
  var elements = $("#tripTable").children().length; //表示id为“mtTable”的标签下的子标签的个数
   
  $("#tripTable").children().eq(elements-1).after(tableHtml); //在表头之后添加空白行
  num++;  
 }

//删除行
function removeStuffTr(trNum){
 $("#tbody"+trNum).remove();
var i = 0;
	$("#tripTable tbody ").each(function () { //循环tab tbody下的tr
		$(this).find("input[name='No']").val(i++);//更新行号
		
	});
	day=i+1;
	num=i-1;
}
//修改线路行程   以及修改投标行程   2020.12.15 hanxl
function addTables() {
	var length=$("#tripTable").children().length-1;
	var id=$("#tripTable").children()[length].id;
	var count=Number(id.substr(id.lastIndexOf("y") + 1))+1;
 var tableHtml ="";
 tableHtml += 
'<tbody id="tbody'+count+'">'
+'<tr>'
+'<th rowspan="11" colspan="2" ><label for="TripDay'+count+'">第</label><input type="number" class="daywidth" id="TripDay'+count+'" name="Day" size="2" maxlength="2"  value="'+Number(length+1)+'" required="required"/><label for="TripDay'+num+'">天</label><span class="mustWrite">*</span></th>'
+'<th ><label for="TripAddress'+count+'">地点</label></th>'
+'<td ><input type="text" id="TripAddress'+count+'" name="Address" maxlength="128" required="required"/><span class="mustWrite">*</span></td>'
+'<th ><label for="TripStay'+count+'">住宿</label></th>'
+'<td ><input type="text" id="TripStay'+count+'" name="Stay" maxlength="128" required="required"/><span class="mustWrite">*</span></td>'
+'<th ><label for="TripMeal'+count+'">含餐</label></th>'
+'<td ><input type="text" id="TripMeal'+count+'" name="Meal" maxlength="64" required="required"/><span class="mustWrite">*</span></td>'
+'<td rowspan="11"><input type="button"  class="btn" onclick="removeTr('+count+')" value="删除"></td> '
+'</tr>'
+'<tr>'
+'<th ><label for="TripTrip'+count+'">具体行程</label></th>'
+'<td colspan="5"><textarea id="TripTrip'+count+'" name="Trip" maxlength="512" required="required"></textarea><span class="mustWrite">*</span></td>'
+'</tr>'
+'<tr>'
+'<th rowspan="4"><label for="TripHotel1'+count+'">酒店照片</label></th>'
+'<td><label for="TripHotel1'+count+'">图片1:</label></td>'
+'<td colspan="4" ><input type="file" id="TripHotel1'+count+'" name="HotelPath1" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripHotel2'+count+'">图片2:</label></td>'
+'<td colspan="4" ><input type="file" id="TripHotel2'+count+'" name="HotelPath2" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripHotel3'+count+'">图片3:</label></td>'
+'<td colspan="4" ><input type="file" id="TripHotel3'+count+'" name="HotelPath3" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripHotel4'+count+'">图片4:</label></td>'
+'<td colspan="4" ><input type="file" id="TripHotel4'+count+'" name="HotelPath4" /></td>'
+'</tr>'
+'<tr>'
+'<th rowspan="4"><label for="TripScenic1'+count+'">景点照片</label></th>'
+'<td><label for="TripScenic1'+count+'">图片1:</label></td>'
+'<td colspan="4" ><input type="file" id="TripScenic1'+count+'" name="ScenicPath1" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripScenic2'+count+'">图片2:</label></td>'
+'<td colspan="4" ><input type="file" id="TripScenic2'+count+'" name="ScenicPath2" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripScenic3'+count+'">图片3:</label></td>'
+'<td colspan="4" ><input type="file" id="TripScenic3'+count+'" name="ScenicPath3" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripScenic4'+count+'">图片4:</label></td>'
+'<td colspan="4" ><input type="file" id="TripScenic4'+count+'" name="ScenicPath4" /></td>'
+'</tr>'
+'<tr>'
+'<td><label for="TripMemo'+count+'">备注:</label></td>'
+'<td colspan="5" ><textarea id="TripMemo'+count+'" name="Memo" maxlength="256"></textarea></td>'
+'</tr>'
+'</tbody>';
   
  var elements = $("#tripTable").children().length; //表示id为“mtTable”的标签下的子标签的个数
   
  $("#tripTable").children().eq(elements-1).after(tableHtml); //在表头之后添加空白行
  length++;  
count++;
 }
/*添加签证材料整理*/
function addTableStuff() {
var length=$("#tripTable").children().length-1;
 var tableHtml ="";
 tableHtml += 
'<tbody id="tbody'+length+'">'
+'<tr>'
+'<th rowspan="2"><label for="StuffNo'+length+'">序号</label></th>'
+'<td rowspan="2"><input type="number" id="StuffNo'+length+'" name="No" size="2"  value="'+Number(length+1)+'"/></td>'
+'<th ><label for="VisaStuffName'+length+'">材料名称</label></th>'
+'<td >'
+'<input type="text" id="VisaStuffName'+length+'" name="StuffName" /></td>'
+'<th ><label for="VisaStuffNumber'+length+'">所需数量</label></th>'
+'<td ><input type="number" id="VisaStuffNumber'+length+'" name="Number" /></td>'
+'<td rowspan="2"><input type="button"  class="btn" onclick="removeStuffTr('+length+')" value="删除"></td> '
+'</tr>'
+'<tr>'
+'<td><label for="VisaStuffMemo'+length+'">备注:</label></td>'
+'<td colspan="3" ><textarea id="VisaStuffMemo'+length+'" name="Memo"></textarea></td>'
+'</tr>'
+'</tbody>';
   
  var elements = $("#tripTable").children().length; //表示id为“mtTable”的标签下的子标签的个数
   
  $("#tripTable").children().eq(elements-1).after(tableHtml); //在表头之后添加空白行
  length++; 
 }
// 添加投标明细 hanxl 2020.12.15
function addTableDetailed() {
 var tableHtml ="";
 tableHtml += 
'<tbody id="tbody'+no+'">'
+'<tr>'
+'<th rowspan="5"><label for="DetailedName'+no+'">明细名称</label></th>'
+'<td rowspan="5"><input type="text" id="DetailedName'+no+'" name="DetailedName" size="2"  maxlength="64" required="required"/><span class="mustWrite">*</span></td>'
+'<th ><label for="DetailedBudget'+no+'">报价</label></th>'
+'<td colspan="3"><input type="number" id="DetailedBudget'+no+'" name="Budget" step="0.01" maxlength="18"  oninput="if(value>999999999999999)value=999999999999999.00;if(value.length>18)value=value.slice(0,18);if(value<0)value=0" required="required"/><span class="mustWrite">*</span></td>'
+'<td rowspan="5"><input type="button"  class="btn" onclick="removeDetailedTr('+no+')" value="删除"></td> '
+'</tr>'
+'<tr>'
+'<th ><label for="DetailedHotel1'+no+'">图片1</label></th>'
+'<th ><label for="DetailedHotel2'+no+'">图片2</label></th>'
+'<th ><label for="DetailedHotel3'+no+'">图片3</label></th>'
+'<th ><label for="DetailedHotel4'+no+'">图片4</label></th>'
+'</tr>'
+'<tr>'
+'<td ><input type="file" id="DetailedHotel1'+no+'" name="HotelPath1" /></td>'
+'<td ><input type="file" id="DetailedHotel2'+no+'" name="HotelPath2" /></td>'
+'<td ><input type="file" id="DetailedHotel3'+no+'" name="HotelPath3" /></td>'
+'<td ><input type="file" id="DetailedHotel4'+no+'" name="HotelPath4" /></td>'
+'</tr>'
+'<tr>'
+'<th ><label for="DetailedContent'+no+'">内容说明</label></th>'
+'<td colspan="3"><textarea id="DetailedContent'+no+'" name="Content" maxlength="1024" required="required"></textarea><span class="mustWrite">*</span></td>'
+'</tr>'
+'<tr>'
+'<th ><label for="DetailedMemo'+no+'">备注</label></th>'
+'<td colspan="3"><textarea id="DetailedMemo'+no+'" name="Memo" maxlength="256"></textarea></td>'
+'</tr>'
+'</tbody>';
   
  var elements = $("#detailedTable").children().length; //表示id为“mtTable”的标签下的子标签的个数
   
  $("#detailedTable").children().eq(elements-1).after(tableHtml); //在表头之后添加空白行
  no++;  
 }

//删除行 2020.12.15 hanxl
function removeDetailedTr(trNum){
 $("#tbody"+trNum).remove();
}
//修改明细 hanxl 2020.12.15
function addDetailedTable() {
var length=$("#detailedTable").children().length-1;
	var id=$("#detailedTable").children()[length].id;
	var count=Number(id.substr(id.lastIndexOf("y") + 1))+1;
 var tableHtml ="";
 tableHtml += 
'<tbody id="tbody'+count+'">'
+'<tr>'
+'<th rowspan="5"><label for="DetailedName'+count+'">明细名称</label></th>'
+'<td rowspan="5"><input type="text" id="DetailedName'+count+'" name="DetailedName" size="2" maxlength="64" required="required"/><span class="mustWrite">*</span></td>'
+'<th ><label for="DetailedBudget'+count+'">报价</label></th>'
+'<td colspan="3"><input type="number" id="DetailedBudget'+count+'" name="Budget" step="0.01" maxlength="18"  oninput="if(value>999999999999999)value=999999999999999.00;if(value.length>18)value=value.slice(0,18);if(value<0)value=0" required="required"/><span class="mustWrite">*</span></td>'
+'<td rowspan="5"><input type="button"  class="btn" onclick="removeDetailedTr('+count+')" value="删除"></td> '
+'</tr>'
+'<tr>'
+'<th ><label for="DetailedHotel1'+count+'">图片1</label></th>'
+'<th ><label for="DetailedHotel2'+count+'">图片2</label></th>'
+'<th ><label for="DetailedHotel3'+count+'">图片3</label></th>'
+'<th ><label for="DetailedHotel4'+count+'">图片4</label></th>'
+'</tr>'
+'<tr>'
+'<td ><input type="file" id="DetailedHotel1'+count+'" name="HotelPath1" /></td>'
+'<td ><input type="file" id="DetailedHotel2'+count+'" name="HotelPath2" /></td>'
+'<td ><input type="file" id="DetailedHotel3'+count+'" name="HotelPath3" /></td>'
+'<td ><input type="file" id="DetailedHotel4'+count+'" name="HotelPath4" /></td>'
+'</tr>'
+'<tr>'
+'<th ><label for="DetailedContent'+count+'">内容说明</label></th>'
+'<td colspan="3"><textarea id="DetailedContent'+count+'" name="Content" maxlength="1024" required="required"></textarea><span class="mustWrite">*</span></td>'
+'</tr>'
+'<tr>'
+'<th ><label for="DetailedMemo'+count+'">备注</label></th>'
+'<td colspan="3"><textarea id="DetailedMemo'+count+'" name="Memo" maxlength="256"></textarea></td>'
+'</tr>'
+'</tbody>';
   
  var elements = $("#detialedTable").children().length; //表示id为“mtTable”的标签下的子标签的个数
   
  $("#detailedTable").children().eq(elements-1).after(tableHtml); //在表头之后添加空白行
  length++;
count++; 
 }
//2020.12.23 hanxl 后台参数设置分页
function constParameterPageSize(value){
	var strText = $("#searchText").val();
	location.href="/mmy/constparameterindex?pageSize=" + value +"&strText=" +strText;	
	}
// 修改参数信息 hanxl 2020.12.23
 	function updateConstParameter(){
		 var checkNum = $("input[name='ckone']:checked").length;
		    if(checkNum==0){
                   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
						var txt=  "确定要修改吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var iID =  $("input[name='ckone']:checked").val();
		location.href="/mmy/toupdateconstparameter?iID="+iID;
	}});
					
				}
		
				}
// 删除参数信息 
function delConstParameter(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
		var txt=  "确定要删除吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
        });
   $.ajax({
        url:"/mmy/deleteconstparameter",
        type:"post",
        data:{
            checkList:checklist.toString()
        },
        dataType:"text",
        success:function () {
			
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success,{onOk:function(){
			 location.reload();
			}});	
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
	}});	
}
}
//后台景点首页显示  分页问题 2020.12.24  hanxl
function scenicBasePageSize(value){
	var strScenicName =  $("#searchScenicName").val();
	var strScenicContact =  $("#searchScenicContact").val();
	var strScenicTel =  $("#searchScenicTel").val();
	var strProvinceID =  $("#searchScenicProvinceID").val();
	var strCityID =  $("#searchScenicCityID").val();
	var strZoneID =  $("#searchScenicZoneID").val();
	location.href="/mmy/scenicbaseindex?pageSize=" + value +"&strScenicName=" +strScenicName+"&strScenicContact=" +strScenicContact+"&strScenicTel=" +strScenicTel+"&strProvinceID=" +strProvinceID+"&strCityID=" +strCityID+"&strZoneID=" +strZoneID;	
	}
//后台	景区新建与修改时正则验证 2020.11.19
function scenicBaseSubmit(scenicBaseForm){
	if(!(/^1[3456789]\d{9}$/.test(scenicBaseForm.Tel.value))){ 
		var txt=  "联系人手机号格式错误！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
					scenicBaseForm.Tel.focus();
						
						}});
	return false;	
    } 
if(scenicBaseForm.Province.value==""){ 
	var txt=  "请选择所在省份！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
					scenicBaseForm.Province.focus();
						}});
	return false;	
    } 
if(scenicBaseForm.City.value==""){ 
   var txt=  "请选择所在市！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
						scenicBaseForm.City.focus();
						
						}});
	return false;	
    }
if(scenicBaseForm.ZoneID.value==""){ 
   var txt=  "请选择所在区！";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
				scenicBaseForm.ZoneID.focus();
						}});
	return false;	
    }
	}
	// 后台修改景点信息  修改2020.12.25 hanxl 原shangzl 写于houtai.js
function updateScenicBase() {
	var checkNum = $("input[name='ckone']:checked").length;

	if (checkNum == 0) {
		   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		return;
	} else if (checkNum > 1) {
		   var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);  
		return;
	} else {
		
		var txt=  "确定要修改吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var iScenicID = $("input[name='ckone']:checked").val();
			location.href = "/mmy/toupdatescenicbase?iScenicID=" + iScenicID;	
	}});
	}

}
// 删除景点信息 修改2020.12.25 hanxl 原shangzl 写于houtai.js
function delScenicBase() {
	var checkNum = $("input[name='ckone']:checked").length;

	if (checkNum == 0) {
		  var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		return;
	} else {

var txt=  "确定要删除吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
        });
   $.ajax({
        url:"/mmy/delscenicbase",
        type:"post",
        data:{
            checkList:checklist.toString()
        },
        dataType:"json",
        success:function (data) {
	      var  lstScenicName=data.lstScenicName;
		if(!(lstScenicName.length==0)){
            var txt= lstScenicName+ "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success,{onOk:function(){
			 location.reload();
			}});	
       }else{
			var txt= "无法删除选中的景区信息";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
			location.reload();
			}});	
}
 },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
	}});	
	}

}
/*进入景区电子票计划页面  2020.12.28 hanxl*/
function toScenicPlan() {
	var checkNum = $("input[name='ckone']:checked").length;

	if (checkNum == 0) {
		   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		return;
	} else if (checkNum > 1) {
		   var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);  
		return;
	} else {
		
		var iScenicID = $("input[name='ckone']:checked").val();
			location.href = "/mmy/scenicplanindex?iScenicID=" + iScenicID;	

	}

}
/*进入景区电子票计划页面 分页  2020.12.28 hanxl*/
function scenicPlanPageSize(value){
	var iScenicID = $("input[name='iScenicID']").val();
	location.href="/mmy/scenicplanindex?pageSize=" + value+"&iScenicID="+iScenicID ;	
	}
// 修改电子票计划信息  修改2020.12.28 hanxl 原shangzl 写于houtai.js
function updateScenicPlan() {
	var checkNum = $("input[name='ckone']:checked").length;

	if (checkNum == 0) {
		   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		return;
	} else if (checkNum > 1) {
		   var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);  
		return;
	} else {
		
			var txt=  "确定要修改吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var iPlanID = $("input[name='ckone']:checked").val();
			location.href = "/mmy/toupdatescenicplan?iPlanID=" + iPlanID;
	}});
		
	}

}
// 删除电子票计划信息 修改2020.12.28 hanxl 原shangzl 写于houtai.js
function delScenicPlan() {
	var checkNum = $("input[name='ckone']:checked").length;

	if (checkNum == 0) {
		 var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		return;
	} else {
var txt=  "确定要删除吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
	
		var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
        });
   $.ajax({
        url:"/mmy/delscenicplan",
        type:"post",
        data:{
            checkList:checklist.toString()
        },
        dataType:"json",
        success:function (data) {
			var lstTicketName=data.lstTicketName;
			if(!(lstTicketName.length==0)){
            var txt= lstTicketName+ "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success,{onOk:function(){
			 location.reload();
			}});
			}else{
			var txt= "无法删除选中的景区计划";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error,{onOk:function(){
			location.reload();
			}});	
}	
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
	}});
		
	}

}
//进入电子票购票信息  修改2020.12.28 hanxl 原shangzl 写于houtai.js  2021.01.25已弃用  购票查询无需勾选景区信息
//function toScenicOrder() {
// 	var checkNum = $("input[name='ckone']:checked").length;
	// if (checkNum == 0) {
		//   var txt=  "至少选择一项";
 	//		window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
	//	return;
	// } else if (checkNum > 1) {
		  //  var txt=  "最多选择一项";
 			 // window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);  
		 //return;
	// } else {
		// var iScenicID = $("input[name='ckone']:checked").val();
		// location.href = "/mmy/toscenicallorderindex?iScenicID=" + iScenicID;
	// }
// }
/*电子票 全部选择卡 分页 2020.12.29*/
function  scenicOrderPageSize(value){
	var strScenicName = $("#searchScenicName").val();
	var strOrderName = $("#searchOrderName").val();
	var strOrderTel = $("#searchOrderTel").val();
	var strOrderDate = $("#searchOrderDate").val();
	var iOrderState = $("#searchOrderState").val();
	location.href="/mmy/toscenicallorderindex?pageSize=" + value+"&strScenicName="+strScenicName+"&strOrderName="+strOrderName+"&strOrderTel="+strOrderTel+"&strOrderDate="+strOrderDate+"&iOrderState="+iOrderState ;	
}
/*电子票 未入园选择卡 分页 2021.01.05*/
function  scenicUnUsedOrderPageSize(value){
	var strScenicName = $("#searchScenicName").val();
	var strOrderName = $("#searchOrderName").val();
	var strOrderTel = $("#searchOrderTel").val();
	var strOrderDate = $("#searchOrderDate").val();
	location.href="/mmy/toscenicunusedorderindex?pageSize=" + value+"&strScenicName="+strScenicName+"&strOrderName="+strOrderName+"&strOrderTel="+strOrderTel+"&strOrderDate="+strOrderDate;	
}
/*电子票退款 原shangzl写cancelOrderScenic（）  电子票取消订单 2021.01.05  hanxl  */

/* 电子票取消订单  原
function cancelOrderScenic() {
	var checkNum = $("input[name='ckone1']:checked").length;

	if (checkNum == 0) {
		alert("至少选择一项");
		return;
	} else if (checkNum > 1) {
		alert("最多选择一项");
		return;
	} else {
		if (confirm("确定要取消订单吗？")) {
			var id = $("input[name='ckone1']:checked").val();
			var scenicid = $("input[name='ScenicID']").val();
			var url = "/mmy/entercancelorderscenic?iID=" + id;
			url += "&iScenicID=" + scenicid;
			window.location = url;
		}
	}

}*/

function refundAllowedIsOrNot(){
	//获取登陆人的所属公司
	var iSysUserOrgID=parseInt($("input[name='iSysUserOrgID']").val());
	var checkNum = $("input[name='radioThis']:checked").length;
	if(checkNum==0){
       var txt=  "请选择一条记录！";
 	   window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
	} else{
		//获取退单流程
		 var iRefundProcess = parseInt($('input:radio[name="radioThis"]:checked').parents("tr").find("input[name='iRefundProcess']").val());
		//获取景区所属公司
		var iScenicOrgID = parseInt($('input:radio[name="radioThis"]:checked').parents("tr").find("input[name='iScenicOrgID']").val());		
		//获取订单操作人所属公司
		var iOrderUserOrgID = parseInt($('input:radio[name="radioThis"]:checked').parents("tr").find("input[name='iOrderUserOrgID']").val());		
		//获取订单操作人类型
		var iOrderUserType = parseInt($('input:radio[name="radioThis"]:checked').parents("tr").find("input[name='iOrderUserType']").val());		
		//获取选择的订单流水号
		var iID = $("input[name='radioThis']:checked").val();
		//判断退单流程为空
		if (iRefundProcess==0){
			//判断登录人所属公司和景区所属公司是否相等 如果相等判断登陆人类型
			if(iSysUserOrgID==iScenicOrgID){
				//登录人类型如果为游客 则进入退单页面
				if(iOrderUserType==0){
					//进入退单页面
					var txt=  "确定要退款吗？";
					window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){			
					var url ="/mmy/backtorefundorderscenic?iID="+iID;
					window.location = url;
					}});	
				}else{
					//否则为员工
					//判断员工所属公司和登录人所属公司是否相等
					//如果相等
					if(iSysUserOrgID==iOrderUserOrgID){
						//进入退单页面
						var txt=  "确定要退款吗？";
						window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
						var url ="/mmy/backtorefundorderscenic?iID="+iID;
						window.location = url;
						}});	
					}else{
						//如果不相等不能操作
						//不能点击
						var txt=  "非本公司操作员订单不可点击";
						window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
					}
				}
			}else{
				//如果登录人所属公司与景区所属公司不相等
				//退单流程改为申请退单
				var txt=  "确定要申请退款吗？";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
	   				$.ajax({
	        			url:"/mmy/saveupdateprocessscenic?iID="+iID,
	       				type:"post",
	        			data:{ },
	       		 		dataType:"json",
	        			success:function (data) {
							var strOrderName=data.strOrderName;
	            			var txt= strOrderName+ "的订单已申请退款，等待反馈";
							window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success,{onOk:function(){
					 		location.reload();
							}});	
	        			},
	       	 			error:function () {
	           				var txt=  "申请退款失败";
							window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
	        			}
	    			})
				}});
			}
		}else if(iRefundProcess==1){
			//如果退单流程为申请退单
			//判断景区与登录人是否为同公司
			//如果公司相等
			if(iSysUserOrgID==iScenicOrgID){
				//判断操作人是否为游客
				//如果为游客
				if(iOrderUserType==0){
					//进入退款页面
					var txt=  "确定要退款吗？";
					window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){			
						var url ="/mmy/backtorefundorderscenic?iID="+iID;
						window.location = url;
					}});	
				}else{
					//判断操作人公司是否与登录人公司相等
					//如果相等
					if(iSysUserOrgID==iOrderUserOrgID){
						//进入退单款页面
						var txt=  "确定要退款吗？";
						window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
							var url ="/mmy/backtorefundorderscenic?iID="+iID;
							window.location = url;
						}});	
					}else{
						//如果不相等不能操作
						//进入反馈页面填写退单流程和退款金额	
						var url ="/mmy/backtoscenicrefundorder?iID="+iID;
						window.location = url;
								
					}
				}
			}else{
				//如果公司不相等 操作人员只可能为相同公司
				//不可点击
				var txt=  "已申请退款，等待反馈";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
			}
		}else{
			//退单流程为允许退单或则不允许退单
			//判断景区与登录人是否为同公司
			//如果公司相等
			if(iSysUserOrgID==iScenicOrgID){
				//订单操作人为同公司的或者订单操作人为游客的已经为退单补出现在未入园的选项卡中  只能是操作员非本公司的
				var txt=  "非本公司操作员订单不可点击";
				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);	
			}else{
				//如果公司不相等 操作人员只可能为相同公司
				//更改退单流程退单金额以及订单状态
				var txt=  "确定要退款吗？";
					window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){			
						var url ="/mmy/backtorefundorderscenic?iID="+iID;
						window.location = url;
					}});
			}
		}					
	}	
				
}		

/*电子票 近期使用选择卡 分页 2021.01.05*/
function  scenicRecentlyUseOrderPageSize(value){
	var strScenicName = $("#searchScenicName").val();
	var strOrderName = $("#searchOrderName").val();
	var strOrderTel = $("#searchOrderTel").val();
	var strOrderDate = $("#searchOrderDate").val();
	location.href="/mmy/toscenicrecentlyuseorderindex?pageSize=" + value+"&strScenicName="+strScenicName+"&strOrderName="+strOrderName+"&strOrderTel="+strOrderTel+"&strOrderDate="+strOrderDate;	
}
/*电子票 已使用选择卡 分页 2021.01.05*/
function  scenicUsedOrderPageSize(value){
	var strScenicName = $("#searchScenicName").val();
	var strOrderName = $("#searchOrderName").val();
	var strOrderTel = $("#searchOrderTel").val();
	var strOrderDate = $("#searchOrderDate").val();
	location.href="/mmy/toscenicusedorderindex?pageSize=" + value+"&strScenicName="+strScenicName+"&strOrderName="+strOrderName+"&strOrderTel="+strOrderTel+"&strOrderDate="+strOrderDate;	
}
/*电子票 已使用选择卡 结账 2021.01.28*/
function updateRemittanceStateScenic() {
	var checkNum = $("input[name='ckone']:checked").length;
	if (checkNum == 0) {
		 var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		return;
	} else {
var txt=  "确定要结账吗？";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,{onOk:function(){
		var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
        });
   $.ajax({
        url:"/mmy/updateremittancestatescenic",
        type:"post",
        data:{
            checkList:checklist.toString()
        },
        dataType:"text",
        success:function () {
            var txt= "结账成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success,{onOk:function(){
			 location.reload();
			}});
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
	}});
		
	}

}



/* 修改 */


/* 修改酒店基本信息 */
	function updateHotelBase(){
		 var checkNum = $("input[name='ckone']:checked").length;
		
		    if(checkNum==0){
		       var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
		    } else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
					var iHotelID =  $("input[name='ckone']:checked").val();
					
					 location.href="/mmy/toupdatehotelbase?iHotelID="+iHotelID;
				}
		
				}
		
/*  进入单据查询 liys 2020.12.24 */
	function Orderline(){
		 var checkNum = $("input[name='ckone']:checked").length;
		    if(checkNum==0){
				location.href="/mmy/orderreserved";
			}
			else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
					var iLineID =  $("input[name='ckone']:checked").val();	 
					 location.href="/mmy/orderreserved?iLineID="+iLineID;
				}
				}	
/* 进入预留单选项卡*/
	function orderreserved(){
		var iLineID = $("#LineID").val();
		 location.href="/mmy/orderreserved?iLineID="+iLineID;
	} 			
													

/* 修改线路行程信息 */
	function updateLineTrip(){
		 var iLineID = $("#LineID").val();
		location.href="/mmy/toupdatelinetrip?iLineID="+iLineID;
				
		
				}
	
	
	/* 修改签证材料信息 */
	function updateVisaStuff(){
		 var iVisaID = $("#VisaID").val();
		location.href="/mmy/toupdatevisastuff?iVisaID="+iVisaID;
				
		
				}
	
			
				/* 修改餐馆信息 */
	function updateRestaurantbase(){
		 var checkNum = $("input[name='ckone']:checked").length;
		
		    if(checkNum==0){
		      
 				
                   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
               
 

		    } else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
					var iRestaurantID =  $("input[name='ckone']:checked").val();
					 
					 location.href="/mmy/toupdaterestaurantbase?iRestaurantID="+ iRestaurantID;
				}
		
				}
	/* 修改餐馆计划信息 */
	function updateRestaurantPlan(){
		 var checkNum = $("input[name='ckone']:checked").length;
		
		    if(checkNum==0){
		      
 				
                   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
               
 

		    } else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
					var iPlanID =  $("input[name='ckone']:checked").val();
					 
					 location.href="/mmy/toupdaterestaurantplan?iPlanID="+iPlanID;
				}
		
				}
				
					
				/* 修改酒店房间信息 */
	function updateHotelRoom(){
		 var checkNum = $("input[name='ckone']:checked").length;
		
		    if(checkNum==0){
		      
 				
                   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
               
 

		    } else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
					var iRoomID =  $("input[name='ckone']:checked").val();
					 
					 location.href="/mmy/toupdateroom?iRoomID="+ iRoomID;
				}
		
				}

	/* 修改酒店计划信息 */
	function updateHotelPlan(){
		 var checkNum = $("input[name='ckone']:checked").length;
		
		    if(checkNum==0){
		      
 				
                   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
               
 

		    } else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
					var iPlanID =  $("input[name='ckone']:checked").val();
					 
					 location.href="/mmy/toupdatehotelplan?iPlanID="+iPlanID;
				}
		
				}
	/* 修改导游信息 */
	function updateGuide(){
		 var checkNum = $("input[name='ckone']:checked").length;
		
		    if(checkNum==0){
		     var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
               
 

		    } else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
					var iGuideID =  $("input[name='ckone']:checked").val();
					 
					 location.href="/mmy/toupdateguide?iGuideID="+ iGuideID;
				}
		
				}
	
/* 删除*/
/* 删除签证基本信息 */
function delVisaBaseBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
					
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deleteVisaBaseChecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
        success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}
/* 删除酒店基本信息 */
function delHotelBaseBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
      var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
	
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deletehotelbasechecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
        success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}


/* 删除境内游线路基本信息 */
function delDomesticBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
	
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deletedomesticchecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
       success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}
/* 删除境外游线路基本信息 */
function delOutboundBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
	
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deleteoutboundchecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
       success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}
/* 删除目的地游线路基本信息 */
function delDestinationBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
	
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deletedestinationchecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
       success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}
/* 删除招标基本信息 */
function delBidInviteBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
				
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deletebidinvitechecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
        success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}




/* 删除餐馆基本信息 */
function delRestaurantbaseBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
				
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deleterestaurantbasechecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
        success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}
/* 删除餐馆计划信息 */
function delRestaurantPlanBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
				
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deleterestaurantplanchecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
        success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}



/* 删除酒店房间信息 */
function delHotelRoomBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
				
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deleteroomchecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
        success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}

/* 删除餐馆计划信息 */
function delHotelPlanBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
				
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deletehotelplanchecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
        success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}


/* 删除导游信息 */
function delGuideBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
				
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deleteguidechecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
        success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}

/* 删除投标信息 */
function delBidTenderBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
				
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deletebidtenderchecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
        success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}

/*修改行程*/				
function saveUpdateLineTrip(){
	var LineID=$("#LineID").val()
 	var objTable=$("#tripTable tbody");
	var arrs=[];
	for( var i=0; i<objTable.length-1 ; i++ )
	{
		var lineTrip= {};
		
		lineTrip['Day']=$("#TripDay"+i).val();
		lineTrip['Address']=$("#TripAddress"+i).val();
		lineTrip['Stay']=$("#TripStay"+i).val();
		lineTrip['Meal']=$("#TripMeal"+i).val();		
		lineTrip['Trip']=$("#TripTrip"+i).val();
		lineTrip['HotelPath1']=$("#TripHotel1"+i).val();
		lineTrip['HotelPath2']=$("#TripHotel2"+i).val();
		lineTrip['HotelPath3']=$("#TripHotel3"+i).val();
		lineTrip['HotelPath4']=$("#TripHotel4"+i).val();
		lineTrip['ScenicPath1']=$("#TripScenic1"+i).val();
		lineTrip['ScenicPath2']=$("#TripScenic2"+i).val();
		lineTrip['ScenicPath3']=$("#TripScenic3"+i).val();
		lineTrip['ScenicPath4']=$("#TripScenic4"+i).val();
		lineTrip['Memo']=$("#TripMemo"+i).val();
		arrs.push(lineTrip);	
	}
	
 	$.ajax({
	        url:"/mmy/saveupdatelinetrip",
	        type:"post",
	        data:{"LineID":JSON.stringify(LineID),"trip":JSON.stringify(arrs)},
	        dataType:"text",

	          success:function (data) {
        		    
            var txt=  "修改成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
	        },

	        error:function () {
	        	 var txt=  "修改失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
	        }
	})
}



/*创建境内游基本信息及行程*/				
function savaCreateDomestic(){
	var lineBase= new Object();
	lineBase.cLineName=$("#LineName").val();
	lineBase.iZoneID=$("#ZoneID").val();
	lineBase.iOrgID=$("#LineOrgID").val();
	lineBase.iPlaceID=$("#LinePlace").val();
	lineBase.cTime=$("#LineTime").val();
	lineBase.cItineraryPath=$("#LineItineraryPath").val();
	lineBase.cOwn=$("#LineOwn").val();
	lineBase.cTips=$("#LineTips").val();
	lineBase.cExplain=$("#LineExplain").val();
	lineBase.cStandard=$("#LineStandard").val();
	lineBase.cMemo=$("#LineMemo").val();
	var arr=[];
	arr.push(lineBase);
	
 	var objTable=$("#tripTable tbody");
	var arrs=[];
	for( var i=0; i<objTable.length-1 ; i++ )
	{
		var lineTrip= {};
		
		lineTrip['Day']=$("#TripDay"+i).val();
		lineTrip['Address']=$("#TripAddress"+i).val();
		lineTrip['Stay']=$("#TripStay"+i).val();
		lineTrip['Meal']=$("#TripMeal"+i).val();		
		lineTrip['Trip']=$("#TripTrip"+i).val();
		lineTrip['HotelPath1']=$("#TripHotel1"+i).val();
		lineTrip['HotelPath2']=$("#TripHotel2"+i).val();
		lineTrip['HotelPath3']=$("#TripHotel3"+i).val();
		lineTrip['HotelPath4']=$("#TripHotel4"+i).val();
		lineTrip['ScenicPath1']=$("#TripScenic1"+i).val();
		lineTrip['ScenicPath2']=$("#TripScenic2"+i).val();
		lineTrip['ScenicPath3']=$("#TripScenic3"+i).val();
		lineTrip['ScenicPath4']=$("#TripScenic4"+i).val();
		lineTrip['Memo']=$("#TripMemo"+i).val();
		arrs.push(lineTrip);	
	}
	
 	$.ajax({
	        url:"/mmy/savecreatedomestic",
	        type:"post",
	        data:{"base":JSON.stringify(arr),"trip":JSON.stringify(arrs)},
	        dataType:"text",

	          success:function (data) {
        		    window.location.href="domestictourismindex";
            var txt=  "创建成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
	        },

	        error:function () {
	        	 var txt=  "创建失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
	        }
	})
}



/*创建境外游基本信息及行程*/				
function savaCreateOutbound(){
	var lineBase= new Object();
	lineBase.cLineName=$("#LineName").val();
	lineBase.iZoneID=$("#ZoneID").val();
	lineBase.iOrgID=$("#LineOrgID").val();
	lineBase.iPlaceID=$("#LinePlace").val();
	lineBase.cTime=$("#LineTime").val();
	lineBase.cItineraryPath=$("#LineItineraryPath").val();
	lineBase.cOwn=$("#LineOwn").val();
	lineBase.cTips=$("#LineTips").val();
	lineBase.cExplain=$("#LineExplain").val();
	lineBase.cStandard=$("#LineStandard").val();
	lineBase.cMemo=$("#LineMemo").val();
	var arr=[];
	arr.push(lineBase);
	
 	var objTable=$("#tripTable tbody");
	var arrs=[];
	for( var i=0; i<objTable.length-1 ; i++ )
	{
		var lineTrip= {};
		
		lineTrip['Day']=$("#TripDay"+i).val();
		lineTrip['Address']=$("#TripAddress"+i).val();
		lineTrip['Stay']=$("#TripStay"+i).val();
		lineTrip['Meal']=$("#TripMeal"+i).val();		
		lineTrip['Trip']=$("#TripTrip"+i).val();
		lineTrip['HotelPath1']=$("#TripHotel1"+i).val();
		lineTrip['HotelPath2']=$("#TripHotel2"+i).val();
		lineTrip['HotelPath3']=$("#TripHotel3"+i).val();
		lineTrip['HotelPath4']=$("#TripHotel4"+i).val();
		lineTrip['ScenicPath1']=$("#TripScenic1"+i).val();
		lineTrip['ScenicPath2']=$("#TripScenic2"+i).val();
		lineTrip['ScenicPath3']=$("#TripScenic3"+i).val();
		lineTrip['ScenicPath4']=$("#TripScenic4"+i).val();
		lineTrip['Memo']=$("#TripMemo"+i).val();
		arrs.push(lineTrip);	
	}
	
 	$.ajax({
	        url:"/mmy/savecreateoutbound",
	        type:"post",
	        data:{"base":JSON.stringify(arr),"trip":JSON.stringify(arrs)},
	        dataType:"text",

	          success:function (data) {
        		    window.location.href="outboundtourismindex";
            var txt=  "创建成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
	        },

	        error:function () {
	        	 var txt=  "创建失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
	        }
	})
}
/*创建目的地游基本信息及行程*/				
function savaCreateDestination(){
	var lineBase= new Object();
	lineBase.cLineName=$("#LineName").val();
	lineBase.iZoneID=$("#ZoneID").val();
	lineBase.iOrgID=$("#LineOrgID").val();
	lineBase.iPlaceID=$("#LinePlace").val();
	lineBase.cTime=$("#LineTime").val();
	lineBase.cItineraryPath=$("#LineItineraryPath").val();
	lineBase.cOwn=$("#LineOwn").val();
	lineBase.cTips=$("#LineTips").val();
	lineBase.cExplain=$("#LineExplain").val();
	lineBase.cStandard=$("#LineStandard").val();
	lineBase.cMemo=$("#LineMemo").val();
	var arr=[];
	arr.push(lineBase);
	
 	var objTable=$("#tripTable tbody");
	var arrs=[];
	for( var i=0; i<objTable.length-1 ; i++ )
	{
		var lineTrip= {};
		
		lineTrip['Day']=$("#TripDay"+i).val();
		lineTrip['Address']=$("#TripAddress"+i).val();
		lineTrip['Stay']=$("#TripStay"+i).val();
		lineTrip['Meal']=$("#TripMeal"+i).val();		
		lineTrip['Trip']=$("#TripTrip"+i).val();
		lineTrip['HotelPath1']=$("#TripHotel1"+i).val();
		lineTrip['HotelPath2']=$("#TripHotel2"+i).val();
		lineTrip['HotelPath3']=$("#TripHotel3"+i).val();
		lineTrip['HotelPath4']=$("#TripHotel4"+i).val();
		lineTrip['ScenicPath1']=$("#TripScenic1"+i).val();
		lineTrip['ScenicPath2']=$("#TripScenic2"+i).val();
		lineTrip['ScenicPath3']=$("#TripScenic3"+i).val();
		lineTrip['ScenicPath4']=$("#TripScenic4"+i).val();
		lineTrip['Memo']=$("#TripMemo"+i).val();
		arrs.push(lineTrip);	
	}
	
 	$.ajax({
	        url:"/mmy/savecreatedestination",
	        type:"post",
	        data:{"base":JSON.stringify(arr),"trip":JSON.stringify(arrs)},
	        dataType:"text",

	          success:function (data) {
        		    window.location.href="destinationtourismindex";
            var txt=  "创建成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
	        },

	        error:function () {
	        	 var txt=  "创建失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
	        }
	})
}

			/*进入创建签证材料信息页面 */
	function createVisaStuff(){
		 var checkNum = $("input[name='ckone']:checked").length;
		
		    if(checkNum==0){
		      
 				
                   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
               
 

		    } else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
					var iVisaID =  $("input[name='ckone']:checked").val();
					 
					 location.href="/mmy/tocreatevisastuff?iVisaID="+ iVisaID;
				}
		
				}
/*创建签证材料信息*/				
function savaCreateStuff(){
	var visaID=$("#VisaID").val();
	
 	var objTable=$("#tripTable tbody");
	var arr=[];
	for( var i=0; i<objTable.length-1 ; i++ )
	{
		var visastuff= {};

		visastuff['No']=$("#StuffNo"+i).val();
		
		visastuff['StuffName']=$("#VisaStuffName"+i).val();
		visastuff['Number']=$("#VisaStuffNumber"+i).val();		
		
		visastuff['Memo']=$("#VisaStuffMemo"+i).val();
		arr.push(visastuff);	
	}
	
 	$.ajax({
	        url:"/mmy/savecreatevisastuff",
	        type:"post",
	        data:{"visaID":JSON.stringify(visaID),"stuff":JSON.stringify(arr)},
	        dataType:"text",

	        success:function (data) {
        		    window.location.href="visaindex";
            var txt=  "创建成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
	        },

	        error:function () {
	        	 var txt=  "创建失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
	        }
	})
	
	}
			/*修改签证材料信息*/				
function saveUpdateVisaStuff(){
	var visaID=$("#VisaID").val();
	
 	var objTable=$("#tripTable tbody");
	var arr=[];
	for( var i=0; i<objTable.length-1 ; i++ )
	{
		var visastuff= {};

		visastuff['No']=$("#StuffNo"+i).val();
		
		visastuff['StuffName']=$("#VisaStuffName"+i).val();
		visastuff['Number']=$("#VisaStuffNumber"+i).val();		
		
		visastuff['Memo']=$("#VisaStuffMemo"+i).val();
		arr.push(visastuff);	
	}
	
 	$.ajax({
	        url:"/mmy/savecreatevisastuff",
	        type:"post",
	        data:{"visaID":JSON.stringify(visaID),"stuff":JSON.stringify(arr)},
	        dataType:"text",

	        success:function (data) {
        		    /*window.location.href="visainfo?iVisaID="+VisaID;*/
            var txt=  "修改成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
	        },

	        error:function () {
	        	 var txt=  "修改失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
	        }
	})
}	

/* 后台修改游客收货基本信息 */
	function updateMemberAddress(){
		 var checkNum = $("input[name='ckone']:checked").length;
		
		    if(checkNum==0){
		      
 				
                   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
               
 

		    } else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
					var iAddressID =  $("input[name='ckone']:checked").val();
					 
					 location.href="/mmy/toupdatememberaddress?iAddressID="+iAddressID;
				}
		
				}
/* 后台删除游客收货基本信息 */
function delMemberAddressBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
					
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deletememberaddresschecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
        success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}
/* 后台修改员工收货基本信息 */
	function updateStaffAddress(){
		 var checkNum = $("input[name='ckone']:checked").length;
		
		    if(checkNum==0){
		      
 				
                   var txt=  "至少选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
               
 

		    } else if(checkNum>1){
			var txt=  "最多选择一项";
 				window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
				}else{
					var iAddressID =  $("input[name='ckone']:checked").val();
					 
					 location.href="/mmy/toupdatestaffaddress?iAddressID="+iAddressID;
				}
		
				}
/* 后台删除员工收货基本信息 */
function delStaffAddressBatch(){
		  var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    }else{
					
    if(confirm("确定要删除吗？")){
        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });
    }
    
    $.ajax({
        url:"/mmy/deletestaffaddresschecked",
        type:"post",
        data:{
            checkList:checklist.toString()

        },
        dataType:"text",
        success:function () {
			 location.reload();
            var txt=  "删除成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
        },
        error:function () {
           var txt=  "删除失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
        }
    })
}
}
/*创建员工*/
function saveCreateStaff(){
	
 var checkNum = $("input[name='ckone']:checked").length;

    if(checkNum==0){
       var txt=  "至少选择一项";
 	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.warning);
    } else{
		var sysUser= new Object();
	sysUser.cUserName=$("#StaffName").val();
	sysUser.bSex=$("#StaffSex").val();
	sysUser.cIdentity=$("#StaffIdentity").val();
	sysUser.cUserMobile=$("#StaffMobile").val();
	sysUser.iUserType=$("#StaffType").val();
	sysUser.iOrgID=$("#StaffOrg").val();
	sysUser.iUpUserID=$("#StaffUp").val();
	sysUser.cMail=$("#StaffMail").val();
	sysUser.cTel=$("#StaffTel").val();
	sysUser.cFax=$("#StaffFax").val();
	sysUser.cJob=$("#StaffJob").val();
	sysUser.cCadePath=$("#StaffCade").val();
	sysUser.cPhotoPath=$("#StaffPhoto").val();
	sysUser.bVip=$("#StaffVip").val();
	sysUser.bBlack=$("#StaffBlack").val();
	sysUser.iAccountState=$("#StaffAccountState").val();
	sysUser.iMemberState=$("#StaffState").val();
	sysUser.cMemo=$("#StaffMemo").val();
	var arr=[];
	arr.push(sysUser);

        var checklist = new Array();
        $("input[name='ckone']:checked").each(function () {
            checklist.push($(this).val());
		
        });

    $.ajax({
        url:"/mmy/savecreatestaff",
        type:"post",
	        data:{"sysUser":JSON.stringify(arr),checkList:checklist.toString()},
	        dataType:"text",

         success:function (data) {
        		    window.location.href="staffindex";
            var txt=  "创建成功";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
			
	        },

	        error:function () {
	        	 var txt=  "创建失败";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
	        }
	})
}
}
